package com.itany.corejava.day06;

public class Test3 {
    public static void main(String[] args) {
        IntStack stack=new IntStack(3);

        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);

        int size=stack.getSize();
        for (int i = 0; i < size; i++) {
            System.out.println(stack.pop());
        }

        stack.pop();


    }
}
